package com.vdong.task.job.service.jobhandler;

import com.alibaba.dubbo.config.annotation.Reference;
import com.vdong.member.account.facade.AccountPeddleUserFacadeService;
import com.vdong.trade.order.facade.OrderFacade;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import org.springframework.stereotype.Component;

/**
 * 更新推客等级有效期
 *
 * @author lidong
 * @Date 2019/01/11 11:24
 */
@JobHandler(value = "peddleUserLevelHandler")
@Component
public class PeddleUserLevelHandler extends IJobHandler {

    @Reference
    private AccountPeddleUserFacadeService accountPeddleUserFacadeService;

    @Override
    public ReturnT<String> execute(String param) throws Exception {
        XxlJobLogger.log("更新推客等级有效期start============");
        accountPeddleUserFacadeService.peddleUserLevelInitialization();
        XxlJobLogger.log("更新推客等级有效期end============");
        return SUCCESS;
    }
}
